<?php
/*========================================= JooSam =========================================/
/																							/
/	Extention:		JooSam																	/
/	Created by:		ScriptPlanet.eu															/
/	Site:			http://www.scriptplanet.eu												/
/	Email:			support@scriptplanet.eu													/
/	Support:		http://www.scriptplanet.eu/support										/
/	Copyright:		2011 (c) ScriptPlanet.eu												/
/	License:		CC BY-NC-ND 3.0 ~ http://creativecommons.org/licenses/by-nc-nd/3.0/		/
/	File Version:	0001																	/
/																							/
/========================================== JooSam ========================================*/
// Joomla security
defined('_JEXEC') or die;

## Import Joomla Data
jimport('joomla.application.component.view');


class JoosamViewModPlg extends JView{
	
	public function display($tpl = null){
		
		## Check Error
		if (count($errors = $this->get('Errors'))) {
			JError::raiseError(500, implode('<br />', $errors));
			return false;
		}

		## Set toolbar & Document
		$this->addToolBar();
		$this->setDocument();

		## Displat
		parent::display($tpl);
	}

	## Toolbar
	protected function addToolBar(){
		JToolBarHelper::title(JText::_('COM_JOOSAM_VIEW_MODPLG_TITLEBAR'), 'modplg-title-logo');
	}

	## Document
	protected function setDocument() {
		$document = JFactory::getDocument();
		$document->setTitle(JText::_('COM_JOOSAM_VIEW_MODPLG_TITLE'));
		$document->addStyleDeclaration('.icon-48-modplg-title-logo{
											background-image:url(../media/com_joosam/images/modules.Title.Logo.png);
											background-position:10px 1px;
										}
										.jsamLegend{
											border-radius:10px;
										}
		');
	}
}
?>